<?php

require_once 'include/iCalcreator.class.php';

$category = $_GET['category'];
$pubDate = $_GET['pubDate'];
$title = $_GET['title'];
$description = $_GET['description'];


$v = new vcalendar(array('unique_id' => 'tu-braunschweig.de'));
// initiate new CALENDAR
$v->setProperty('X-WR-CALNAME'
        , 'Events TU Braunschweig');          // set some X-properties, name, content.. .
$v->setProperty('X-WR-CALDESC'
        , 'Eventkalender der TU Braunschweig');
$v->setProperty('X-WR-TIMEZONE'
        , 'Europe/Berlin');

$e = & $v->newComponent('vevent');           // initiate a new EVENT
$e->setProperty('categories'
        , $category);                   // catagorize
$e->setProperty('dtstart'
        , $pubDate);  // Datum
$e->setProperty('summary', $title);
$e->setProperty('description'
        , $description);    // describe the event
//$e->setProperty( 'location'
//               , 'TU Braunschweig' );
$v->returnCalendar();
?>
    